package com.yjq.programmer.controller.app;

import com.yjq.programmer.dto.LyricsDTO;
import com.yjq.programmer.dto.ResponseDTO;
import com.yjq.programmer.service.ILyricsService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 杨杨吖
 * @QQ 823208782
 * @WX yjqi12345678
 * @create 2022-11-13 20:58
 */
@RestController("AppLyricsController")
@RequestMapping("/app/lyrics")
public class LyricsController {

    @Resource
    private ILyricsService lyricsService;

    /**
     * 小程序根据音乐id获取歌词数据
     * @param lyricsDTO
     * @return
     */
    @PostMapping("/getByMusicId")
    public ResponseDTO<List<LyricsDTO>> appGetLyricsListByMusicId(@RequestBody LyricsDTO lyricsDTO){
        return lyricsService.getLyricsListByMusicId(lyricsDTO);
    }
}
